package com.yxy.ms.manager.log;

import java.io.File;

public class Tail implements LogFileTailerListener {

    public Tail(String filename) {
        LogFileTailer tailer = new LogFileTailer(new File(filename), 1000, true);
        tailer.setTailing(true);
        tailer.addLogFileTailerListener(this);
        tailer.start();
    }

    @Override
    public void newLogFileLine(String line) {
        System.out.println(line);
    }

    public static void main(String[] args) {

        Tail tail = new Tail("/Users/yangcheng6327/trans-scheduler-clear.json");

    }

}
